package com.iris.live.services.data.models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Date;

/**
 * Created by DF on 9/19/2016.
 *
 */
@Entity
@Table(name = "dealerAttachmentPolicy", schema = "sg_lsh", catalog = "")
public class DealerAttachmentPolicyModel {
    private int id;
    private String permit;
    private String department;
    private Integer car;
    private Integer apperanceCode;
    private String item;
    private String condition;
    private BigDecimal devidedSiMsrp;
    private BigDecimal siMsrp;
    private BigDecimal devidedSiCost;
    private BigDecimal siCost;
    private BigDecimal siCostPercent;
    private String ncType;
    private Integer totalCountlimit;
    private Date startDate;
    private Date endDate;
    private String status;
    private Date createDate;
    private Date modifyDate;
    private String itemType;
    private String releaseStatus;
    private String remark;
    private Integer itemCount;

    @Id
    @GeneratedValue (strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "permit")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "department")
    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    @Basic
    @Column(name = "car")
    public Integer getCar() {
        return car;
    }

    public void setCar(Integer car) {
        this.car = car;
    }

    @Basic
    @Column(name = "apperance_code")
    public Integer getApperanceCode() {
        return apperanceCode;
    }

    public void setApperanceCode(Integer apperanceCode) {
        this.apperanceCode = apperanceCode;
    }

    @Basic
    @Column(name = "item")
    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    @Basic
    @Column(name = "`condition`")
    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    @Basic
    @Column(name = "devided_si_msrp")
    public BigDecimal getDevidedSiMsrp() {
        return devidedSiMsrp;
    }

    public void setDevidedSiMsrp(BigDecimal devidedSiMsrp) {
        this.devidedSiMsrp = devidedSiMsrp;
    }

    @Basic
    @Column(name = "siMsrp")
    public BigDecimal getSiMsrp() {
        return siMsrp;
    }

    public void setSiMsrp(BigDecimal siMsrp) {
        this.siMsrp = siMsrp;
    }

    @Basic
    @Column(name = "devided_si_cost")
    public BigDecimal getDevidedSiCost() {
        return devidedSiCost;
    }

    public void setDevidedSiCost(BigDecimal devidedSiCost) {
        this.devidedSiCost = devidedSiCost;
    }

    @Basic
    @Column(name = "siCost")
    public BigDecimal getSiCost() {
        return siCost;
    }

    public void setSiCost(BigDecimal siCost) {
        this.siCost = siCost;
    }

    @Basic
    @Column(name = "si_cost_percent")
    public BigDecimal getSiCostPercent() {
        return siCostPercent;
    }

    public void setSiCostPercent(BigDecimal siCostPercent) {
        this.siCostPercent = siCostPercent;
    }

    @Basic
    @Column(name = "NC_Type")
    public String getNcType() {
        return ncType;
    }

    public void setNcType(String ncType) {
        this.ncType = ncType;
    }

    @Basic
    @Column(name = "totalCountlimit")
    public Integer getTotalCountlimit() {
        return totalCountlimit;
    }

    public void setTotalCountlimit(Integer totalCountlimit) {
        this.totalCountlimit = totalCountlimit;
    }

    @Basic
    @Column(name = "startDate")
    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    @Basic
    @Column(name = "endDate")
    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Basic
    @Column(name = "`status`")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "createDate")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "modifyDate")
    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    @Basic
    @Column(name = "itemType")
    public String getItemType() {
        return itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    @Basic
    @Column(name = "releaseStatus")
    public String getReleaseStatus() {
        return releaseStatus;
    }

    public void setReleaseStatus(String releaseStatus) {
        this.releaseStatus = releaseStatus;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "item_count")
    public Integer getItemCount() {
        return itemCount;
    }

    public void setItemCount(Integer itemCount) {
        this.itemCount = itemCount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DealerAttachmentPolicyModel that = (DealerAttachmentPolicyModel) o;

        if (id != that.id) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (department != null ? !department.equals(that.department) : that.department != null) return false;
        if (car != null ? !car.equals(that.car) : that.car != null) return false;
        if (apperanceCode != null ? !apperanceCode.equals(that.apperanceCode) : that.apperanceCode != null)
            return false;
        if (item != null ? !item.equals(that.item) : that.item != null) return false;
        if (condition != null ? !condition.equals(that.condition) : that.condition != null) return false;
        if (devidedSiMsrp != null ? !devidedSiMsrp.equals(that.devidedSiMsrp) : that.devidedSiMsrp != null)
            return false;
        if (siMsrp != null ? !siMsrp.equals(that.siMsrp) : that.siMsrp != null) return false;
        if (devidedSiCost != null ? !devidedSiCost.equals(that.devidedSiCost) : that.devidedSiCost != null)
            return false;
        if (siCost != null ? !siCost.equals(that.siCost) : that.siCost != null) return false;
        if (siCostPercent != null ? !siCostPercent.equals(that.siCostPercent) : that.siCostPercent != null)
            return false;
        if (ncType != null ? !ncType.equals(that.ncType) : that.ncType != null) return false;
        if (totalCountlimit != null ? !totalCountlimit.equals(that.totalCountlimit) : that.totalCountlimit != null)
            return false;
        if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) return false;
        if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (modifyDate != null ? !modifyDate.equals(that.modifyDate) : that.modifyDate != null) return false;
        if (itemType != null ? !itemType.equals(that.itemType) : that.itemType != null) return false;
        if (releaseStatus != null ? !releaseStatus.equals(that.releaseStatus) : that.releaseStatus != null)
            return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (itemCount != null ? !itemCount.equals(that.itemCount) : that.itemCount != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (department != null ? department.hashCode() : 0);
        result = 31 * result + (car != null ? car.hashCode() : 0);
        result = 31 * result + (apperanceCode != null ? apperanceCode.hashCode() : 0);
        result = 31 * result + (item != null ? item.hashCode() : 0);
        result = 31 * result + (condition != null ? condition.hashCode() : 0);
        result = 31 * result + (devidedSiMsrp != null ? devidedSiMsrp.hashCode() : 0);
        result = 31 * result + (siMsrp != null ? siMsrp.hashCode() : 0);
        result = 31 * result + (devidedSiCost != null ? devidedSiCost.hashCode() : 0);
        result = 31 * result + (siCost != null ? siCost.hashCode() : 0);
        result = 31 * result + (siCostPercent != null ? siCostPercent.hashCode() : 0);
        result = 31 * result + (ncType != null ? ncType.hashCode() : 0);
        result = 31 * result + (totalCountlimit != null ? totalCountlimit.hashCode() : 0);
        result = 31 * result + (startDate != null ? startDate.hashCode() : 0);
        result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (modifyDate != null ? modifyDate.hashCode() : 0);
        result = 31 * result + (itemType != null ? itemType.hashCode() : 0);
        result = 31 * result + (releaseStatus != null ? releaseStatus.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (itemCount != null ? itemCount.hashCode() : 0);
        return result;
    }
}
